package com.zoo.wuhua.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;

import com.zoo.wuhua.dao.JpaBookDao;
import com.zoo.wuhua.entity.JpaBook;

/**
 * @description
 * @author zhangli7@yusys.com.cn
 * @since 2020年2月16日 上午10:34:34 v1.0
 */
@Service
public class BookJpaService {

    @Autowired
    JpaBookDao jpaBookDao;

    public void addJpaBook(JpaBook JpaBook) {
        jpaBookDao.save(JpaBook);
    }

    public Page<JpaBook> getJpaBookByPage(Pageable pageable) {
        return jpaBookDao.findAll(pageable);
    }
}
